<?php

namespace Database\Factories;

use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class UserFactory extends Factory
{
  /**
   * The name of the factory's corresponding model.
   *
   * @var string
   */
  protected $model = User::class;

  /**
   * Define the model's default state.
   *
   * @return array
   */
  public function definition()
  {
    return [
      'username' => $this->faker->unique()->userName(),

      // 'pid' => $this->faker->numberBetween(1, 22),
      'mobile' => $this->faker->phoneNumber,
      'coins' => 0,
      // 'deposit' => $this->faker->numberBetween(0, 999),
      'fee_ratio' => 0,
      'tip' => 0,
      //'realname' => $this->faker->name,

      'password' => bcrypt('88888888'),
      //'avatar' => $this->faker->imageUrl(100, 100),
      //'remember_token' => Str::random(10),
      'login_at' => $this->faker->dateTimeThisMonth(),
      'login_ip' => $this->faker->ipv4,
      "created_at" => $this->faker->dateTimeThisMonth,
      'enable' => 1,
    ];
  }

  /**
   * Indicate that the model's email address should be unverified.
   *
   * @return \Illuminate\Database\Eloquent\Factories\Factory
   */
  // public function unverified()
  // {
  //     return $this->state(function (array $attributes) {
  //         return [
  //             'email_verified_at' => null,
  //         ];
  //     });
  // }
}
